from .base import BaseConfig
from utils import common


class WifiConfig(BaseConfig):
    def __init__(self, path):
        super().__init__(path)

    def is_debug(self):
        debug = common.get_data_value(self.__config, "debug")
        return debug == 1

    def get_ssid(self):
        return common.get_data_value(self.__config, "ssid")

    def get_password(self):
        return common.get_data_value(self.__config, "password")

    def get_txpower(self):
        """设置wifi天线功率: 5"""
        return common.get_data_value(self.__config, "txpower")
